const nodeCategory = {
  AFS: 'afs',
  ODF: 'odf',
  Transport: 'transport',
  LightSplit: 'light_split',
  digitComm: 'digit_comm',
  afsCluster: 'afs_cluster'

}
const nodeCategoryOptions = [
  {
    label: '光配机器人',
    value: nodeCategory.AFS
  }, {
    label: 'ODF架',
    value: nodeCategory.ODF
  }, {
    label: '传输设备',
    value: nodeCategory.Transport
  }, {
    label: '光交箱',
    value: nodeCategory.LightSplit
  },

  {
    label: '数通设备',
    value: nodeCategory.digitComm
  }
]
const nodeTypeEnum = {
  AFS: '光配机器人',
  LightDelivery: 'light_delivery',
  ODF: 'odf',
  OTN: 'otn',
  SDH: 'sdh',
  PTN: 'ptn',
  OLT: 'olt',
  PDH: 'pdh',
  ASON: 'ason',
  WDM: 'wdm',
  LightSplit: 'light_split',
  AFSCLUSTER: 'afs_cluster'

}
const odfNodeTypeOptions = [
  {
    label: 'ODF架',
    value: nodeTypeEnum.ODF
  },
  {
    label: '光交箱',
    value: nodeTypeEnum.LightDelivery
  }
]
const transportNodeTypeOptions = [
  {
    label: 'OTN设备',
    value: nodeTypeEnum.OTN
  }, {
    label: 'SDH设备',
    value: nodeTypeEnum.SDH
  }, {
    label: 'PTN设备',
    value: nodeTypeEnum.PTN
  }, {
    label: 'OLT设备',
    value: nodeTypeEnum.OLT
  }, {
    label: '有源波分设备',
    value: nodeTypeEnum.WDM
  }, {
    label: 'PDH设备',
    value: nodeTypeEnum.PDH
  }, {
    label: 'ASON设备',
    value: nodeTypeEnum.ASON
  }

]
const lightSplitNodeTypeOptions = [
  {
    label: '光分器设备',
    value: nodeTypeEnum.LightSplit
  }
]
const afsNodeTypeOptions = [
  {
    label: '光配机器人',
    value: nodeTypeEnum.AFS
  }]

const deviceTypeSelectOptions = [
  {
    label: '光配机器人',
    value: nodeCategory.AFS

  }, {
    label: 'ODF架',
    value: nodeCategory.ODF

  }, {
    label: '传输设备',
    value: nodeCategory.Transport

  }, {
    label: '光分器',
    value: nodeCategory.LightSplit

  },
  {
    label: '数通设备',
    value: nodeCategory.digitComm
  }
]

const deviceTypeoptions = [
  {
    label: '光配机器人',
    value: nodeCategory.AFS,
    children: afsNodeTypeOptions
  }, {
    label: 'ODF架',
    value: nodeCategory.ODF,
    children: odfNodeTypeOptions
  }, {
    label: '传输设备',
    value: nodeCategory.Transport,
    children: transportNodeTypeOptions
  }, {
    label: '光分器',
    value: nodeCategory.LightSplit,
    children: lightSplitNodeTypeOptions
  },
  {
    label: '数通设备',
    value: nodeCategory.DigitComm
  }
]

// 法兰盘类型
const flanEnum = {
  FC: 'FC',
  LC: 'LC',
  SC: 'SC'
}

const flanOptions = [{
  label: 'FC',
  value: flanEnum.FC
}, {
  label: 'LC',
  value: flanEnum.LC
}, {
  label: 'SC',
  value: flanEnum.SC
}]

// 光缆级别
const opticalCableLevelEnum = {
  Backbone: 'backbone',
  Trunk: 'trunk',
  Relay: 'relay',
  Wiring: 'wiring'
}

const opticalCableLevelOptions = [{
  label: 'opticCableConfigPage.backBoneCable', // 骨干光缆
  value: opticalCableLevelEnum.Backbone
}, {
  label: 'opticCableConfigPage.trunkCable', // 主干光缆
  value: opticalCableLevelEnum.Trunk
}, {
  label: 'opticCableConfigPage.relayCable', // 中继光缆
  value: opticalCableLevelEnum.Relay
}, {
  label: 'opticCableConfigPage.wiringCable', // 配线光缆
  value: opticalCableLevelEnum.Wiring
}]

// 光缆类型
const opticalCableTypeEnum = {
  Indoor: 'indoor',
  Outdoor: 'outdoor'
}

const opticalCableTypeOptions = [{
  label: 'opticCableConfigPage.outdoorCable', // 室外通信光缆
  value: opticalCableTypeEnum.Indoor
}, {
  label: 'opticCableConfigPage.indoorCable', // 室内通信光缆
  value: opticalCableTypeEnum.Outdoor
}]

// 光缆规格
const opticalCableNormEnum = {
  Single: 'single',
  Multi: 'multi'
}

const opticalCableNormOptions = [{
  label: 'opticCableConfigPage.singleMode', // 单模
  value: opticalCableNormEnum.Single
}, {
  label: 'opticCableConfigPage.multiMode', // 多模
  value: opticalCableNormEnum.Multi
}]

// 纤芯类型
const fibreTypeEnum = {
  G651: 'G.651',
  G652: 'G.652',
  G655: 'G.655'
}

const fibreTypeOptions = [{
  label: 'G.651',
  value: fibreTypeEnum.G651
}, {
  label: 'G.652',
  value: fibreTypeEnum.G652
}, {
  label: 'G.655',
  value: fibreTypeEnum.G655
}]
const yesOrNoEnum = {
  YES: true,
  NO: false
}
const yesOrNoOptions = [{
  label: 'operate.okYes',
  value: yesOrNoEnum.YES
}, {
  label: 'operate.okNo',
  value: yesOrNoEnum.NO
}]
const moduleInterfaceTypeEnum = {
  Single: 'single',
  Double: 'double'
}
const moduleInterfaceTypeOptions = [{
  label: 'opticCableConfigPage.singleCore', // 单芯双向
  value: moduleInterfaceTypeEnum.Single
}, {
  label: 'opticCableConfigPage.twinCore', // 双芯双向
  value: moduleInterfaceTypeEnum.Double
}]
const moduleTypeEnum = {
  Single: 'single',
  Double: 'double'
}

const moduleTypeOptions = [{
  label: 'opticCableConfigPage.singleMode', // 单模
  value: moduleTypeEnum.Single
}, {
  label: 'opticCableConfigPage.multiMode', // 多模
  value: moduleTypeEnum.Double
}]
const moduleRateEnum = {
  '155M': 1,
  '622M': 2,
  '2.5G': 3,
  '10G': 4,
  '40G': 5
}
const moduleRateOptions = [{
  label: '155M',
  value: moduleRateEnum['155M']
}, {
  label: '622M',
  value: moduleRateEnum['622M']
}, {
  label: '2.5G',
  value: moduleRateEnum['2.5G']
}, {
  label: '10G',
  value: moduleRateEnum['10G']
}, {
  label: '40G',
  value: moduleRateEnum['40G']
}]
const moduleWavelengthEnum = {
  '1310nm': 1,
  '1550nm': 2,
  '1490nm': 3
}
const moduleWavelengthOptions = [{
  label: '1310nm',
  value: moduleWavelengthEnum['1310nm']
}, {
  label: '1550nm',
  value: moduleWavelengthEnum['1550nm']
}, {
  label: '1490nm',
  value: moduleWavelengthEnum['1490nm']
}]
const isInstallOptions = [{
  label: 'opticCableConfigPage.installed',
  value: yesOrNoEnum.YES
}, {
  label: 'opticCableConfigPage.uninstalled',
  value: yesOrNoEnum.NO
}]

// 通道状态枚举

const channelCategory = {
  idle: 'idle',
  open: 'open',
  backup: 'backup',
  damage: 'damage',
  conn: 'conn',
  main: 'main',
  occupy: 'occupy'
}
const channelCategoryOptions = [
  {
    label: '空闲',
    value: channelCategory.idle
  }, {
    label: '开通',
    value: channelCategory.open
  }, {
    label: '备用',
    value: channelCategory.backup
  }, {
    label: '损坏',
    value: channelCategory.damage
  },
  {
    label: '成端',
    value: channelCategory.conn
  }, {
    label: '主用',
    value: channelCategory.main
  }, {
    label: '占用',
    value: channelCategory.occupy
  }
]

// 路由管理---通道状态
const routeChannelCategory = {
  idle: 'idle',
  backup: 'backup',
  damage: 'damage',
  main: 'main',
  handle: 'handle'
}
const routeChannelOptions = [
  {
    label: 'operate.idle',
    value: routeChannelCategory.idle
  }, {
    label: 'operate.standby',
    value: routeChannelCategory.backup
  }, {
    label: 'operate.damage',
    value: routeChannelCategory.damage
  },
  {
    label: 'operate.mainUse',
    value: routeChannelCategory.main
  },
  {
    label: 'operate.process',
    value: routeChannelCategory.handle
  }
]

// 设备收发状态枚举

const deviceRSCategory = {
  a: 'a',
  z: 'z',
  duplex: 'duplex'

}
const deviceRSOptions = [
  {
    label: 'operate.receive', // 收
    value: deviceRSCategory.a
  }, {
    label: 'operate.send', // 发
    value: deviceRSCategory.z
  }, {
    label: 'operate.sendReceive', // 收/发
    value: deviceRSCategory.duplex
  }
]

// 任务模块-----执行状态枚举
const executionStatusCategory = {
  all: '',
  wait_execute: 'wait_execute',
  executing: 'executing',
  complete: 'complete',
  stopped: 'stopped'
}
const executionStatusOptions = [
  {
    label: 'operate.all', // 全部
    value: executionStatusCategory.all
  },
  {
    label: 'runResult.waiting', // 等待执行
    value: executionStatusCategory.wait_execute
  }, {
    label: 'runResult.running', // 执行中
    value: executionStatusCategory.executing
  }, {
    label: 'runStatus.completed', // 已完成
    value: executionStatusCategory.complete
  }, {
    label: 'runResult.stopped', // 已停止
    value: executionStatusCategory.stopped
  }
]

// 任务模块-----执行结果枚举
const executionResultCategory = {
  all: '',
  wait_execute: 'wait_execute',
  executing: 'executing',
  success: 'success',
  exception: 'exception',
  stopped: 'stopped'
}
const executionResultOptions = [
  {
    label: 'operate.all', // 全部
    value: executionResultCategory.all
  },
  {
    label: 'runResult.waiting', // 等待执行
    value: executionResultCategory.wait_execute
  }, {
    label: 'runResult.running', // 执行中
    value: executionResultCategory.executing
  }, {
    label: 'runResult.succes', // 成功
    value: executionResultCategory.success
  }, {
    label: 'runResult.abnormal', // 异常
    value: executionResultCategory.exception
  }, {
    label: 'runResult.stopped', // 已停止
    value: executionResultCategory.stopped
  }
]

// 检测 测试相关

const waveLengths = [
  {
    label: '850',
    value: 850
  },
  {
    label: '1300',
    value: 1300
  },
  {
    label: '1310',
    value: 1310
  },
  {
    label: '1383',
    value: 1383
  },
  {
    label: '1490',
    value: 1490
  },
  {
    label: '1550',
    value: 1550
  },
  {
    label: '1625',
    value: 1625
  },
  {
    label: '1650',
    value: 1650
  }
]
const pulseWidths = [
  {
    label: '3',
    value: 3
  },
  {
    label: '5',
    value: 5
  },
  {
    label: '10',
    value: 10
  },
  {
    label: '30',
    value: 30
  },
  {
    label: '50',
    value: 50
  },
  {
    label: '80',
    value: 80
  },
  {
    label: '100',
    value: 100
  },
  {
    label: '160',
    value: 160
  },
  {
    label: '275',
    value: 275
  },
  {
    label: '320',
    value: 320
  },
  {
    label: '500',
    value: 500
  },
  {
    label: '640',
    value: 640
  },
  {
    label: '1000',
    value: 1000
  },
  {
    label: '1280',
    value: 1280
  },
  {
    label: '3000',
    value: 3000
  },
  {
    label: '5000',
    value: 5000
  },
  {
    label: '8000',
    value: 8000
  },
  {
    label: '10000',
    value: 10000
  },
  {
    label: '20000',
    value: 20000
  }
]
const testRanges = [
  {
    label: '0.5',
    value: 500
  },
  {
    label: '1',
    value: 1000
  },
  {
    label: '2',
    value: 2000
  },
  {
    label: '2.5',
    value: 2500
  },

  {
    label: '4',
    value: 4000
  },
  {
    label: '5',
    value: 5000
  },
  {
    label: '8',
    value: 8000
  },
  {
    label: '15',
    value: 15000
  },
  {
    label: '16',
    value: 16000
  },
  {
    label: '32',
    value: 32000
  },
  {
    label: '40',
    value: 40000
  },
  {
    label: '64',
    value: 64000
  },

  {
    label: '80',
    value: 80000
  },

  {
    label: '120',
    value: 120000
  },

  {
    label: '128',
    value: 128000
  },

  {
    label: '160',
    value: 160000
  },

  {
    label: '256',
    value: 256000
  }

]
const testModes = [
  { value: 'avg', label: '平均测试' },
  { value: 'realtime', label: '实时测试' },
  { value: 'auto', label: '自动测试' }
]

// 业务模块-----锁定状态枚举
const lockedStatusCategory = {
  locked: 'locked',
  unlocked: 'unlocked'

}
const lockedStatusOptions = [
  {
    label: '锁定状态',
    value: lockedStatusCategory.locked
  }, {
    label: '未锁定',
    value: lockedStatusCategory.unlocked
  }
]

const portStatus = {
  selected: {
    super: '',
    text: 'operate.selected',
    icon: require('@/assets/img/port/selected.png')
  },
  idle: {
    super: '',
    text: 'operate.idle',
    icon: require('@/assets/img/port/idle.png')
  },
  main: {
    super: '',
    text: 'operate.serviceUnavailable',
    icon: require('@/assets/img/port/main.png')
  },
  occupy: {
    super: '',
    text: 'operate.serviceAvailable',
    icon: require('@/assets/img/port/occupy.png')
  },
  backup: {
    super: '',
    text: 'operate.standby',
    icon: require('@/assets/img/port/backup.png')
  },
  damage: {
    super: '',
    text: 'operate.damage',
    icon: require('@/assets/img/port/damage.png')
  },
  damage1: {
    super: '',
    text: 'operate.linkFailure',
    icon: require('@/assets/img/port/damage1.png')
  },
  loopback: {
    super: '01',
    text: 'operate.loopbackPort',
    icon: require('@/assets/img/port/loopback.png')
  },
  loopback1: {
    super: '01',
    text: 'operate.loopbackPort',
    icon: require('@/assets/img/port/loopback1.png')
  },
  conn: {
    super: '01',
    text: 'operate.loopbackPort',
    icon: require('@/assets/img/port/loopback1.png')
  }

}

// 拓扑结构-----端口状态枚举

const topoChannelCategory = {
  idle: 'idle',
  choose: 'choose',
  backup: 'backup',
  damage: 'damage',
  conn: 'conn',
  main: 'main',
  occupy: 'occupy'
}
const topoChannelCategoryOptions = [
  {
    label: '选中',
    value: topoChannelCategory.choose,
    color: '#FFFF00'
  },
  {
    label: '空闲',
    value: topoChannelCategory.idle,
    color: '#FFFFFF'
  }, {
    label: '备用',
    value: topoChannelCategory.backup,
    color: '#00FFFF'
  }, {
    label: '损坏',
    value: topoChannelCategory.damage,
    color: '#FF0000'
  },
  {
    label: '空闲',
    value: topoChannelCategory.conn,
    color: '#FFFFFF'
  }, {
    label: '主用(业务已通)',
    value: topoChannelCategory.main,
    color: '#00FF66'
  }, {
    label: '主用(业务未通)',
    value: topoChannelCategory.occupy,
    color: '#CCCCCC'
  }
]

// 工单处理状态

const workOrderCategory = {
  not_process: 'not_process',
  process_in: 'process_in',
  success: 'success',
  fail: 'fail',
  not_accept: 'not_accept',
  accepted: 'accepted'

}
const workOrderCategoryOptions = [
  {
    label: '未处理',
    value: workOrderCategory.not_process

  },
  {
    label: '处理中',
    value: workOrderCategory.process_in

  }, {
    label: '处理成功',
    value: workOrderCategory.success

  }, {
    label: '处理失败',
    value: workOrderCategory.fail

  },
  {
    label: '未受理',
    value: workOrderCategory.not_accept

  },
  {
    label: '已受理',
    value: workOrderCategory.accepted

  }

]

// 工单类型枚举
const workOrderTypeCategory = {
  open: 'open',
  restore: 'restore',
  all: ''
}
const workOrderTypeCategoryOptions = [
  {
    label: '开通业务',
    value: workOrderTypeCategory.open

  },
  {
    label: '恢复业务',
    value: workOrderTypeCategory.restore

  },
  {
    label: '全部',
    value: workOrderTypeCategory.all

  }
]

// 告警等级颜色
// eslint-disable-next-line camelcase
const alarm_level_color = {
  1: '#FF0000', // 一级告警
  2: '#FF9900', // 二级告警
  3: '#FFFF00', // 三级告警
  4: '#3399FF' // 四级告警
}

// 端口状态
const port_status = [
  {
      "label": "空闲",
      "value": "IDLE"
  },
  {
      "label": "成端",
      "value": "CONN"
  },
  {
      "label": "主用",
      "value": "MAIN"
  },
  {
      "label": "备用",
      "value": "BACKUP"
  },
  {
      "label": "占用",
      "value": "OCCUPY"
  },
  {
      "label": "损坏",
      "value": "DAMAGE"
  },
  {
      "label": "进行中",
      "value": "PROCESS"
  }
]

// 业务状态
const biz_status = [
  {
      "label": "正常",
      "value": "NORMAL"
  },
  {
      "label": "故障",
      "value": "FAULT"
  },
  {
      "label": "恢复",
      "value": "RESTORE"
  },
  {
      "label": "开通中",
      "value": "OPENING"
  },
  {
      "label": "恢复中",
      "value": "RESTORING"
  },
  {
      "label": "还原中",
      "value": "RETURNING"
  },
  {
      "label": "开通失败",
      "value": "OPEN_FAIL"
  },
  {
      "label": "恢复失败",
      "value": "RESTORE_FAIL"
  },
  {
      "label": "还原失败",
      "value": "REDUCTION_FAIL"
  }
]

export {
  workOrderTypeCategory,
  workOrderTypeCategoryOptions,
  workOrderCategory,
  workOrderCategoryOptions,
  topoChannelCategory,
  topoChannelCategoryOptions,
  // eslint-disable-next-line camelcase
  alarm_level_color,

  portStatus,
  routeChannelCategory,
  routeChannelOptions,
  lockedStatusCategory,
  lockedStatusOptions,

  testModes,
  testRanges,
  waveLengths,
  pulseWidths,

  afsNodeTypeOptions,
  odfNodeTypeOptions,
  transportNodeTypeOptions,
  lightSplitNodeTypeOptions,
  nodeCategoryOptions,
  nodeCategory,
  yesOrNoEnum,
  yesOrNoOptions,
  moduleInterfaceTypeEnum,
  moduleInterfaceTypeOptions,
  moduleTypeEnum,
  moduleTypeOptions,
  moduleRateEnum,
  moduleRateOptions,
  moduleWavelengthEnum,
  moduleWavelengthOptions,
  flanOptions,
  nodeTypeEnum,
  isInstallOptions,
  opticalCableLevelOptions,
  opticalCableTypeOptions,
  opticalCableNormOptions,
  fibreTypeOptions,
  deviceTypeoptions,
  deviceTypeSelectOptions,
  channelCategory,
  channelCategoryOptions,
  deviceRSCategory,
  deviceRSOptions,
  executionStatusCategory,
  executionStatusOptions,
  executionResultCategory,
  executionResultOptions,
  port_status,
  biz_status
}
